package singleton;

/**
 * @Description: null
 * @Project: testDemo
 * @Author: hjibo
 * @CreateDate: 2019/1/23 13:13
 * @ModificationHistory: （who whatTime doWhat）
 */
public class SingletonClass2 {

    private static volatile SingletonClass2 singletonClass2;

    public static SingletonClass2 getInstance(){
        if(singletonClass2 == null){
            synchronized (SingletonClass2.class){
                if(singletonClass2 == null){
                    singletonClass2 = new SingletonClass2();
                }
            }
        }
        return singletonClass2;
    }

    private SingletonClass2() {
    }
}
